package cc.wfu.config;

import cc.wfu.type.config.AuthSecurity;
import cc.wfu.type.config.HttpAuthSecurity;
import cc.wfu.type.config.WebAuthSecurity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;

/**
 * @Author: jia-qiang ljq1024.cc
 * @desc:
 * @Date: 2024-05-22-12:31
 */
@Slf4j
@Order(0)
@Configuration
public class SpringSecurityConfig extends AuthSecurity {

    @Override
    public void configure(HttpAuthSecurity security) {
        security.antMatchers(
                "/user/login"
                ,"/product/query/products"
                ,"/product/query/product/**"
                ,"/product/query/info/**"
        );
    }

    @Override
    public void configure(WebAuthSecurity security) {
        security.antMatchers(
                "/**"
        );
    }
}
